From: Jiahao Chen Date: Fri, 18 Jul 2014 14:07:15 +0000 (-0400) Subject: Add 'update' target to Makefile X-Git-Tag: archive/raspbian/2.11.3-2+rpi1^2~24^2^2~241^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=13a72c152a9ea183aefa78d5dd03cd85cd1d523e;p=utf8proc.git Add 'update' target to Makefile This target downloads all necessary Unicode data files using curl and rebuilds utf8proc_data.c using data_generator.rb (saving the new copy to utf8proc_data.c.new). --- diff --git a/Makefile b/Makefile index 735dc2f..523bb16 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ # libutf8proc Makefile +CURL=curl +RUBY=ruby # settings @@ -16,8 +18,26 @@ c-library: libutf8proc.a libutf8proc.so clean: rm -f utf8proc.o libutf8proc.a libutf8proc.so +update: utf8proc_data.c.new + # real targets +utf8proc_data.c.new: UnicodeData.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt + $(RUBY) data_generator.rb < UnicodeData.txt > utf8proc_data.c.new + +UnicodeData.txt: + $(CURL) -O http://www.unicode.org/Public/UNIDATA/UnicodeData.txt + +DerivedCoreProperties.txt: + $(CURL) -O http://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt + +CompositionExclusions.txt: + $(CURL) -O http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt + +CaseFolding.txt: + $(CURL) -O http://www.unicode.org/Public/UNIDATA/CaseFolding.txt + + utf8proc.o: utf8proc.h utf8proc.c utf8proc_data.c $(cc) -c -o utf8proc.o utf8proc.c